package persistent.prestige.console.threadmode.t3.channel;

import java.nio.channels.SelectableChannel;
import java.nio.channels.SocketChannel;

import persistent.prestige.console.threadmode.t3.SubReactorThread;

public class NioSocketChannel extends AbstractChannel {
	
	private SocketChannel ch;

	public NioSocketChannel(SocketChannel ch) {
		this.ch = ch;
	}

	public NioSocketChannel(SocketChannel ch, ChannelPipeline pipeline) {
		this.ch = ch;
		this.channelPipeline = pipeline;
	}

	public NioSocketChannel(SocketChannel ch, ChannelPipeline pipeline, SubReactorThread eventLoop) {
		this.ch = ch;
		this.channelPipeline = pipeline;
		this.eventLoop = eventLoop;
	}

	public void setEventLoop(SubReactorThread eventLoop) {
		this.eventLoop = eventLoop;
	}

	@Override
	public int read(Object msg) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int write(Object msg) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public ChannelPipeline pipeline() {
		// TODO Auto-generated method stub
		return this.channelPipeline;
	}

	@Override
	public SubReactorThread eventLoop() {
		// TODO Auto-generated method stub
		return this.eventLoop;
	}

	@Override
	public SelectableChannel channel() {
		// TODO Auto-generated method stub
		return ch;
	}
	
	

}
